-- tied_pig
-- created by panyl
-- 地牢格子：被绑的野猪

return {
    autoFight = function(grid)
        local pos = grid:getPos();
        if DungeonInstanceM.isInInstance()
            and DungeonM.isAllMonsterDead() then
            if math.random(1, 2) == 1 then
                -- 烧烤
                return DungeonActionM.go("take_instance_bonus", pos);
            else
                -- 解救
                return DungeonActionM.go("rescue_pig", pos);
            end
        end
        return false;
    end,
};
